package com.itheima.d2_collection_traverse;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class CollectionDemo2 {

    public static void main(String[] args) {
        Collection<String> c =new ArrayList<>();
        c.add("aaa");
        c.add("bbb");
        System.out.println(c);

        for(String s1:c){
            System.out.println(s1);
        }

        String[] names = new String[]{"aaa","bbb"};
        for(String s2:names){
            System.out.println(s2);
        }
    }
}
